package com.kingmed.kmss.common.enums.base.code;

/**
 * 定义对外接口规范的code
 * 枚举了一些常用对外API操作码(处理自定义)
 */
public enum ApiResultCode implements IResultCode {

    SUCCESS(20000, "操作成功"),

    FATAL_FAILED(-1, "CRM对外接口异常"),

    FAILED(20001, "服务器内部错误，操作失败"),
    REQ_VALIDATE_FAILED(20002, "参数校验失败，请输入正确的查询条件"),
    UNAUTHORIZED(20003, "接口鉴权失败，appId或appToken失效或者不正确"),
    FORBIDDEN(20004, "没有相关权限"),
    PARSING_DATA_FAILED(20005, "解析数据失败");

    private Integer code;
    private String message;

    ApiResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
